In many situations, a way of measuring the similarity of one digital image to another is useful. This is particularly true when the second image is the result of a transformation performed on the first. Obtaining a numerical metric or figure of merit of the fidelity from a direct measurement of the two digital images at hand is desirable.
Digital images are often represented by files containing rectangular matrices of pixels. The number of pixels is often referred to as the resolution. The term may be used either as the resolution along a given axis or over the image file as a whole.
FIG. 1 represents some of the possible operations that it may be necessary to perform on a digital image file. A digital image file IF1 of M0 pixels wide and N0 pixels height may be operated on to produce a file IF2. IF2 may still be of format M0×N0. These operations can include compression, noise reduction, colour adjustment and many other possibilities.
Alternatively a zoom-like operation may be performed, producing a file IF2-zoom of resolution M1×N1. Also changes of image format are possible, such as from 4/3 to 16/9, in which case IF2-reformat will have a resolution M2×N0. The values of M2, M1 and N1 may be larger or smaller than M0 and N0.
The changes of resolution involve the addition or subtraction of pixels which requires interpolation calculations. There are various algorithms for performing these operations and the behaviour of these algorithms, in terms of errors and artifacts, varies and may depend on the actual content of the image.
It is therefore desirable to provide a technique of measuring the fidelity of one image file to another which can handle transformations which include changes in the number of pixels.